import service from '@/utils/request'

export function listBaseClass(query) {
	return service({
		url: '/gen/baseclass/page',
		method: 'get',
		params: query
	})
}

export const useBaseClassApi = (id) => {
	return service.get('/gen/baseclass/' + id)
}

export const useBaseClassListApi = () => {
	return service.get('/gen/baseclass/list')
}

export const useBaseClassSubmitApi = (dataForm) => {
	if (dataForm.id) {
		return service.put('/gen/baseclass', dataForm)
	} else {
		return service.post('/gen/baseclass', dataForm)
	}
}

export const deleteBaseClass = (ids) => {
	return service({
		url: '/gen/baseclass',
		method: 'delete',
		data: ids
	})
}
